# Usage: ambition.tcl

if {![info exists eWorkDir]} {set eWorkDir [file dirname [info script]]}

package require DPeye

pass cleanUpCache
pass summarizeRawImage locations.bmp 1 0 1 0
create {
	outputFile ambition.ps 
	mapFile "ambition.map"
	title "Ambition & Empire, designed by Jeff S. Kase and Baron M. Powell"
	creator "Mario Huys (woelpad@yahoo.com)"
	$MapDrawingScale .5 $MapSupplyScale .7
	$FrameOverlap $FrameThickness $FrameMargin 0
	images {
		continent {continent.bmp {} black}
		borders1 borders1.bmp
		borders2 borders2.bmp
		locations {locations.bmp {trace 1}}
	} 
	borders {
		seaBorders {image {borders1 cyan borders2 teal} {} InternalBorder}
		land {image {continent black continent olive} LandBrown Border {{} 1 {} 0 1 1}}
		internalBorders {image {borders1 lime borders2 green} {} InternalBorder}
		borders {image {borders2 maroon borders1 red} {} NationalBorder}
		mountain {image {continent grey} MountainGrey NationalBorder}
		lake {image {continent blue} SeaBlue Border {{} 1 {} 0 1 1}}
		crossings {shape bridges ArrowBlack}
	} 
	locationTypes {
		Supplies {number 0 name 0 draw 1 define -1}
		Territories {number 0 name 1 populate 0 info 1}
		ShapePoints {number 0}
	}
	locations {
		supplies {{locations red} Supplies s {Blue {} S} {
			ABO STP CHR STO MOS EDI COU COP LVP KON MEC
			{HAN 1} BER LON UPR WAR HEW DRE ANE BRL KIV BRE
			PAR BAW VIE BAV BUD SWI CRI VEN MIL SAV MAR
			TUS BRC MAD POR PAP CON ANK TWS ALG TUN MOR
		}}
		coasts {{locations green} Territories c {Red DarkGreen AF} {
			ICE NOV {LAP 22 8} ABO {CHR 0 -3} KAR {STP 0 1} STO LVN {EDI -2 -2} SCA
			{COU 0 1} {COP 0 -2} IRE LVP {KON 1 6} YOR {MEC 1 -4} {WAL -2 2} {BER 0 -3} {POS -2 -5} HAN
			{LON 1 -2} {UPR -4 3} {HEW 2 -6} {ANE 3 -3} {PIC -3} KAZ BRE {CRI 9 -15} {WLA -1 -5} {VIE 1 -1} GAS
			{VEN 0 -2} CRO {MAR 0 -1} LEO LAN SAV {TUS -1 -4} POR DAL BOS BRC
			ARM CON SAR TWS AND {ANK 2 6} SYR MOR ALG TUN
		}}
		lands {{locations maroon} Territories l {Green DarkGreen A} {
			MOS {LIT -5 6} KIV {LUS 3} WAR {DRE -2 -1} {BRL -2 2} BOH {GAL 3 -1} {BAW -4 -2} ZAP
			{BAV -1 -3} BUR {PAR 0 -2} {BUD -3 -3} SWI {TYR -2} {MIL 0 4} MAD
		}}
		waters {{locations cyan} Territories w {White White F} {
			BAR NWG {NAO -6 -4} BOT SKA {NTH -4 3} BAL {HEL -3} IRI {ENG -1} MAO
			{BLA 1} LYO ADR {TYS 3 -4} {WES -10 1} GIB AEG {ION 0 8} EAS
		}}
		greens {{locations olive} Territories g {DarkGreen DarkGreen A} {
			{HLS 6 -15} {PAP -2 -1}
		}}
		beaches {{locations yellow} Territories b {Yellow {} F} {
			HLS/EC {HLS/WC 0 -1} PAP/EC {PAP/WC 0 -1}
		}}
		crossings {{locations grey} ShapePoints x DarkGreen}
	}
	shapes {
		bridges {crossings {{connection 1.5 {0 1 6 2.25}} {1 2 {3 -3} 4 5 6}}}
	}
	units {
		army A
		fleet {F ManOfWar}
	}
	powerNameVariations {long orders}
	powers {
		AUSTRIA {A Red Black}
		BRITAIN {B Blue White "BRITAIN & HANOVER"}
		DENMARK {D @Purple White "DENMARK & NORWAY"}
		FRANCE {F Turquoise Black}
		SAXONY {X @OrangeRed Black "POLAND & SAXONY"}
		PRUSSIA {P Black White}
		RUSSIA {R White Black}
		SPAIN {S @DarkRed White}
		SWEDEN {W @DeepPink White}
		TURKEY {T Yellow Black}
		
		PAPACY {_ @LimeGreen @Gold "PAPAL STATES"}
		CATHOLIC {_ @LimeGreen White "CATHOLIC STATES"}
		PROTESTANT {_ @LimeGreen White "PROTESTANT STATES"}
		MUSLIM {_ @Green White "MUSLIM STATES"}
	} 
	layout {corner retreats} fontSize 7
	ownerLineLength 78 retreatBoxLength 15!
	pageMarginHeight 20 pageMarginWidth 30
	drawLayoutBorder 0 composed 0 printLayout 0 testBorder 0 
	addPage 0 pageContents {
		"\{"

		"200 40 DrawFleet"
		"200 40 180 140 ArrowPropose"
		"200 40 100 20 ArrowRetreat"
		"200 40 300 60 ArrowMove"
		
		"180 140 DrawArmy"
		"ProposePhase"
		"180 140 160 240 ArrowMove"
		"RetreatPhase"
		"180 140 80 120 ArrowMove"
		"MovePhase"
		"180 140 280 160 ArrowMove"

		"300 90 DrawFleet"
		"300 90 200 40 180 140 ArrowSupport"
		"300 120 DrawArmy"
		"300 120 180 140 ArrowHold"
		"300 150 DrawFleet"
		"300 150 180 140 160 240 ArrowConvoy"

		"\} dup exec -40 200 translate FailedOrder exec OkOrder 40 -200 translate"
				
		"400 200 DrawFleet"
		"400 200 ArrowArrive"
		"400 230 DrawArmy"
		"400 230 ArrowDepart"
		"400 260 DrawFleet"
		"400 260 ArrowRetreatArrive"
		"400 290 DrawArmy"
		"400 290 ArrowRetreatDepart"
		
		"500 200 DrawFleet"
		"500 200 BuildUnit"
		"500 230 DrawArmy"
		"500 230 DestroyUnit"
		"500 260 DrawFleet"
		"500 260 DisbandUnit"
		"500 290 DrawArmy"
		"500 290 RemoveUnit"
		"500 320 DrawFleet"
		"500 320 FindUnit"
		"500 350 DrawArmy"
		"500 350 LoseUnit"
		"500 380 DrawFleet"
		"500 380 QueryUnit"
    }
}

# For A4 document
#	paperSize A4 pageMarginWidth 15 pageMarginHeight 15 \
#	orderColumns 2 retreatHasHeading 3 retreatBoxLength 9! \
#	layout {corner owners} fontSize 7 \
#	gameTitle Dip boardTitleFontSizeRatio 2 \

# For Letter document
#	paperSize Letter pageMarginWidth 15 pageMarginHeight 30 \
#	orderColumns 2 retreatHasHeading 3 ownerLineLength 0 adjustmentBoxLength 16! \
#	layout {corner adjustments} fontSize 7 \
#	gameTitle Dip boardTitleFontSizeRatio 2 \


#cleanUpCache